home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / clang / jcool01.zip / EX5_8.C < prev    next >
C/C++ Source or Header  |  1992-09-28  |  801b  |  24 lines

  1. //
  2. // Copyright (C) 1991 Texas Instruments Incorporated.
  3. //
  4. // Permission is granted to any individual or institution to use, copy, modify,
  5. // and distribute this software, provided that this complete copyright and
  6. // permission notice is maintained, intact, in all copies and supporting
  7. // documentation.
  8. //
  9. // Texas Instruments Incorporated provides this software "as is" without
  10. // express or implied warranty.
  11. //
  12.  
  13. #include <cool/Vector.h>            // Include vector class
  14.  
  15. #include <cool/Vector.C>
  16.  
  17. int main (void) {
  18.   CoolVector<int> v1;                // Declare CoolVector object
  19.   for (int i = 0; i < 10; i++)            // Copy 10 integers into CoolVector
  20.     v1.push(i);                    // Add element
  21.   cout << v1 << "\n";                // Output CoolVector elements
  22.   return (0);                    // Exit with successful status
  23. }
  24.